<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
	<title>法拉利跑车</title>
	<style type="text/css">

#paodao{
	margin-top: 55px;
	position: absolute;
	left: 0px;
}

	</style>
	<script type="text/javascript">

	Window.onload = function(){
	var lz = document.getElementById("paodao");
	var liang = 0;
	var zhan = 0;
		
	function liangzhan () {
	
	

		if(lz.currentStyle) {  
		         liang = parseInt(lz.currentStyle["left"]);																		
		}else {  
			liang = parseInt(getComputedStyle(lz,false)["left"]); 
			}
		if (liang == 0) {
			zhan = 0;
		} else if(liang == document.documentElement.clientWidth-123){
			zhan = 1;
		};
		if (zhan == 0) {
			lz.style.left = (liang+1)+"px";
		} else if(zhan = 1){
			lz.style.left = (liang-1)+"px";
		};
	}
	lz.onclick = function(){
	window.setInterval(liangzhan,10);
}
}	</script>


	

</head>
<body>	
	<div id="paodao">
		<img id="paoa" src="./p.gif" alt="">
	</div>
</body>
</html>